package com.dcy.daily.skill.log4j2.official;

import com.dcy.daily.skill.log4j2.official.foo.Bar;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author duanchunyu
 * @version 1.0.0
 * @Description 官网Log4j用例
 *日志级别以及优先级排序: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL
 * @createTime 2021年05月24日 16:15:00
 */
public class MyApp {
    private static final Logger logger = LogManager.getLogger(MyApp.class);

    public static void main(final String... args) {
        logger.trace("Entering application.");
        Bar bar = new Bar();
        if (!bar.doIt()) {
            logger.error("Didn't do it.");
        }
        logger.trace("Exiting application.");
    }
}
